import request from '@/utils/request'

// 查询加盟商列表
export function listLeague(query) {
  return request({
    url: '/applet/league/list',
    method: 'get',
    params: query
  })
}

// 查询加盟商详细
export function getLeague(id) {
  return request({
    url: '/applet/league/' + id,
    method: 'get'
  })
}

// 新增加盟商
export function addLeague(data) {
  return request({
    url: '/applet/league',
    method: 'post',
    data: data
  })
}

// 修改加盟商
export function updateLeague(data) {
  return request({
    url: '/applet/league',
    method: 'put',
    data: data
  })
}

// 删除加盟商
export function delLeague(id) {
  return request({
    url: '/applet/league/' + id,
    method: 'delete'
  })
}

// 查询加盟商未分页列表
export function listNoPageLeague(query) {
  return request({
    url: '/applet/league/listNoPage',
    method: 'get',
    params: query
  })
}
